<style scoped lang="less">
    .dashboard-container{
        background-color: #f9f9f9;
        padding:0px 0px 0px 16px;
    }
    .date-bar{
        height:43px;
        line-height: 43px;
        color:cadetblue;
        // padding:0 16px;
    }
    .right-date{
        text-align: right;
    }
    .body-box{
        height:100%;
    }
    .left_three{
        float: left;
        width: 35%;
        height: 80px;
        margin-left: 10%;
        margin-top:15px;
        background-color: #ffffff;
        box-shadow: 0px 12px 35px 0px
        rgba(52, 72, 95, 0.04);
        border-radius: 4px;
        text-align: center;
        font-family: MicrosoftYaHei;
        color: #656c7f;
        font-size: 14px;
        font-weight: normal;
        font-stretch: normal;
    }
    .el-table-column .peianhao{
        color: #E6A23C;
    }
    .el-table .cell{
        width: 100% !important;
        line-height: 15px !important;
        font-size: 11px;
        font-weight: 100 !important;
        font-family: 'ArialMT', 'Arial', sans-serif;
        font-style: normal;
        letter-spacing: normal;
        text-align: center !important;
        text-transform: none;
    }
    .daziti{
        height: 46px;
        font-family: MicrosoftYaHei;
        font-size: 18px;
        font-weight: normal;
        font-stretch: normal;
        line-height: 46px;
        letter-spacing: 1px;
        color: #333333;
    }
    .ziti{
        font-family: MicrosoftYaHei;
        font-size: 14px;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 1px;
        color: #656c7f;
    }
    .left-two-box{
        height: 35px;
        line-height: 35px;
        width: 100%;
        display:flex;
        align-items:center;
    }
    .left-two-text{
        margin-left:7px;
        font-family: MicrosoftYaHei;
        font-size: 14px;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 1px;
        color: #656c7f;
        width: 100%;
    }
    .left-two-text-icon{
        text-align: center;
        margin-left: 41%;
        width: 45px;
        height: 20px;
        line-height: 20px;
        background-color: rgb(216, 216, 216);
        border-radius: 6px;
    }
    .jiantou{
        width: 16px;
        height: 16px;
        line-height:16px;
        background: #f9f9f9;
        border-radius:8px;
        text-align: center;
        margin-left: 15%;
        // float: right;
        //cursor: pointer; /*鼠标悬停变小手*/
    }
    .PointerIcon{
        transform: rotate(270deg);
    }
    input{
        width: 100%;
        height: 40px;
    }
    .left_two{
        float: left;
        width: 29%;
        height: 70px;
        border-radius:4px;
        margin-top:10px;
        margin-right:16px;
        background-color: #ffffff;
        box-shadow: 0px 12px 35px 0px
        rgba(52, 72, 95, 0.04);
        border-radius: 4px;
        font-family: MicrosoftYaHei;
        color: #656c7f;
        font-size: 14px;
        font-weight: normal;
        font-stretch: normal;
    }

    .left_two_number{
        margin-left:16px;
        font-family: MicrosoftYaHei-Bold;
        font-size: 22px;
        font-weight: normal;
        font-stretch: normal;
        letter-spacing: 1px;
        color: #000000;
    }
    .left_two_icon{
        margin-left:14px;
        font-size: 14px;
        color: #666666;
        opacity: 0.7;
    }
    .left_three_icon{
        font-size: 14px;
        color: #666666;
        opacity: 0.7;
    }
    .is_active{
        background-color: #FFD8BF;
    }
    .is_active .left_two_icon{
        color:#fff
    }
    .is_active .left_two_number{
        color:#fff
    }
    .is_active .ziti{
        color:#fff;
    }
    .is_active .jiantou{
        background-color: #fff;
        color:#ff8d2f;
    }
    .left_one{
        background-color: #fff;
        border-radius: 4px;
        padding:0 0px 16px 16px;
        height:234px;
    }
    .orange{
        background-color:#fff2e8;
    }
    .blue{
        background-color:#e6f7ff;
    }
    .green{
        background-color:#f6ffed;
    }
    .el-table{
      // background: #999999;
    }
    .el-row {
        margin-bottom: 20px;
        &:last-child {
          margin-bottom: 0;
        }
    }
    .el-col {
      border-radius: 4px;
    }
    .bg-purple-dark {
        background: #eaecf2;
    }
    .bg-purple {
        background: #d3dce6;
    }
    .bg-purple-light {
        background: #e5e9f2;
    }
    .grid-content {
        border-radius: 4px;
        min-height: 500px;
    }
    .row-bg {
        padding: 10px 0;
        background-color: #f9fafc;
    }
    .search-btn{
        width: 100%;
        height: 50px;
        line-height: 50px;
        margin: auto;
        background-color: #ff8928;
        border-radius: 4px;
        color:#fff;
    }
    </style>
    <template>
        <div class="dashboard-container">
            <!-- <span style="height: 40px;line-height: 40px;margin-left: 1.5%;color: cadetblue">大病首页</span> -->
            <!-- <span style="height: 40px;line-height: 40px;margin-left: 77.5%;color: cadetblue">7月30日 周五 14:25:31</span> -->
            <el-row style="margin-bottom:0">
                <div class="date-bar">
                    <!-- <el-col :span="12">
                      <div>工作台</div>
                    </el-col> -->
                    <el-col :span="24" style="width: 99%">
                      <div class="right-date">{{ date_show }} &nbsp;&nbsp;&nbsp; {{ week }} &nbsp;&nbsp;&nbsp; {{ time_show }}</div>
                    </el-col>
                </div>
            </el-row>
            <el-row >
                <div class="body-box">
                    <el-col :span="19">
                        <div style="background: rgba(255,255,255,-0.5)" class="grid-content bg-purple">
                            <el-row>
                                <div style="width: 100%">
                                    <el-col :span="12">
                                        <div class="left_one orange" >
                                            <div class="daziti" ><b>待处理</b></div>
                                            <div>
                                              <!-- <div  class="left_two" style="background:#ff8928;color: #ffffff;border-radius:10px"> -->
                                              <!-- <div  class="left_two" style="background:white;color: #0e0404;border-radius:10px">   -->
                                              <div  class="left_two ">
                                                  <div style="height: 50%;line-height: 40px">
                                                      <span class="el-icon-phone left_two_icon"></span>
                                                      <span class="ziti">案件登记</span>
                                                      <!-- <span style="" class="el-icon-arrow-right jiantou" @click="toTaskListPage('case_main')"></span> -->
                                                      <!-- <span  class="el-icon-arrow-right jiantou"></span> -->
                                                  </div>
                                                  <div style="height: 50%;line-height: 40px">
                                                      <div class="left_two_number">{{ pendingTask.caseMainNum }}</div>
                                                  </div>
                                              </div>
                                              <div  class="left_two">
                                                  <div style="height: 50%;line-height: 40px">
                                                      <span class="el-icon-s-operation left_two_icon"></span>
                                                      <span class="ziti">案件注销</span>
                                                      <!-- <span style="" class="el-icon-arrow-right jiantou" @click="toTaskListPage('case_main')"></span> -->
                                                      <!-- <span  class="el-icon-arrow-right jiantou"></span> -->
                                                  </div>
                                                  <div style="height: 50%;line-height: 40px">
                                                      <div class="left_two_number">{{ pendingTask.cancelNum }}</div>
                                                  </div>
                                              </div>
                                              <div  class="left_two ">
                                                  <div style="height: 50%;line-height: 40px">
                                                      <span class="el-icon-tickets left_two_icon"></span>
                                                      <span class="ziti">核赔处理</span>
                                                      <!-- <span style="" class="el-icon-arrow-right jiantou" @click="toTaskListPage('case_main')"></span> -->
                                                      <!-- <span  class="el-icon-arrow-right jiantou"></span> -->
                                                  </div>
                                                  <div style="height: 50%;line-height: 40px">
                                                      <div class="left_two_number">{{ pendingTask.undwrtNum }}</div>
                                                  </div>
                                              </div>
                                              <div  class="left_two ">
                                                  <div style="height: 50%;line-height: 40px">
                                                      <span class="el-icon-camera left_two_icon"></span>
                                                      <span class="ziti">案件调查</span>
                                                    <!-- <span style="" class="el-icon-arrow-right jiantou" @click="toTaskListPage('case_main')"></span> -->
                                                    <!-- <span  class="el-icon-arrow-right jiantou"></span> -->
                                                  </div>
                                                  <div style="height: 50%;line-height: 40px">
                                                      <div class="left_two_number">{{ pendingTask.surveyNum }}</div>
                                                  </div>
                                              </div>
                                              <div  class="left_two ">
                                                  <div style="height: 50%;line-height: 40px">
                                                      <span class="el-icon-s-operation left_two_icon"></span>
                                                      <span class="ziti">结算处理</span>
                                                    <!-- <span style="" class="el-icon-arrow-right jiantou" @click="toTaskListPage('case_main')"></span> -->
                                                    <!-- <span  class="el-icon-arrow-right jiantou"></span> -->
                                                  </div>
                                                  <div style="height: 50%;line-height: 40px">
                                                      <div class="left_two_number">{{ pendingTask.settleNum }}</div>
                                                  </div>
                                              </div>
                                            </div>
                                        </div>
                                    </el-col>
                                    <el-col :span="6">
                                        <div class="left_one " style="margin-left: 16px;">
                                            <div class="daziti"><b>正在处理</b></div>
                                            <div class="left-two-box">
                                                <div class="el-icon-phone left_three_icon"></div>
                                                <div class="left-two-text">案件登记</div>
                                                <div class="left-two-text-icon">{{ underwayTask.caseMainNum }}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-s-operation left_three_icon"></div>
                                                <div class="left-two-text">案件注销</div>
                                                <div class="left-two-text-icon">{{ underwayTask.cancelNum }}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-tickets left_three_icon"></div>
                                                <div class="left-two-text">核赔处理</div>
                                                <div class="left-two-text-icon">{{ underwayTask.undwrtNum }}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-camera left_three_icon"></div>
                                                <div class="left-two-text">案件调查</div>
                                                <div class="left-two-text-icon">{{ underwayTask.surveyNum }}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-s-operation left_three_icon"></div>
                                                <div class="left-two-text">结算处理</div>
                                                <div class="left-two-text-icon">{{ underwayTask.settleNum }}</div>
                                            </div>
                                            <!-- <div style="height: 35px;line-height: 35px;width: 100%">
                                              <span style="margin-left: 5%" class="el-icon-s-check"></span>
                                              <span style="margin-left: 5px">退票处理</span>
                                              <span style="margin-left: 40%;">123</span>
                                            </div>
                                            <div style="height: 35px;line-height: 35px;width: 100%">
                                              <span style="margin-left: 5%" class="el-icon-menu"></span>
                                              <span style="margin-left: 5px">其他任务</span>
                                              <span style="margin-left: 40%;">123</span>
                                            </div> -->
                                        </div>
                                    </el-col>
                                    <el-col :span="6">
                                        <div class="left_one " style="margin-left: 16px;">
                                            <div class="daziti"><b>已处理</b></div>
                                            <div class="left-two-box">
                                                <div class="el-icon-monitor left_three_icon"></div>
                                                <div class="left-two-text">一天内</div>
                                                <div class="left-two-text-icon">{{ finishTask.oneDayNum}}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-monitor left_three_icon"></div>
                                                <div class="left-two-text">一周内</div>
                                                <div class="left-two-text-icon">{{ finishTask.oneWeekNum}}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-monitor left_three_icon"></div>
                                                <div class="left-two-text">半月内</div>
                                                <div class="left-two-text-icon">{{ finishTask.halfMonthNum}}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-monitor left_three_icon"></div>
                                                <div class="left-two-text">一月内</div>
                                                <div class="left-two-text-icon">{{ finishTask.thisMonthNum}}</div>
                                            </div>
                                            <div class="left-two-box">
                                                <div class="el-icon-monitor left_three_icon"></div>
                                                <div class="left-two-text">半年内</div>
                                                <div class="left-two-text-icon">{{ finishTask.halfYearNum}}</div>
                                            </div>
                                            <!-- <div style="height: 35px;line-height: 35px;width: 100%">
                                              <span style="margin-left: 5%" class="el-icon-monitor"></span>
                                              <span style="margin-left: 5px">更多</span>
                                              <span style="margin-left: 52%;">112</span>
                                            </div> -->
                                        </div>
                                    </el-col>
                                </div>
                            </el-row>
                            <div style="width: 100%;height: 300px;margin-top: 16px;background: white;border-radius:10px">
                              <div style="height: 44px;line-height:44px;margin-top: 10px;background: #f5f5f5;border-radius: 10px">
                                <span style="height: 40px;line-height: 40px;font-size: 20px;margin-left: 1%"><b>最近任务</b></span>
                                <span style="height: 40px;line-height: 40px;color: #999999;margin-left: 1%">温馨提示：默认展示最近一个月</span>
                                <!-- <span style="height: 40px;line-height: 40px;margin-left: 62%">
                                    <a href="">更多 ></a>
                                </span> -->
                              </div>
                              <template>
                                <div class="recent-task">
                                  <el-table
                                    :data="tableData"
                                    :stripe="false"
                                    :header-cell-style="{color: '#848484', fontsize: '14px'}"
                                    style="width: 100%;">
                                    <el-table-column prop="businessNo" label="大病赔案号" align="center" width="">
                                        <template  slot-scope="scope">
                                          <!-- <a href="#" >
                                              <el-button  type="text"  @click="toTaskDetailPage(scope.row)" >{{scope.row.businessNo}}</el-button>
                                          </a> -->
                                            <a @click="toTaskDetailPage(scope.row)" style="color: #1e99f9;cursor: pointer">{{ scope.row.businessNo }}</a>
                                      </template>
                                    </el-table-column>
                                    <!-- <el-table-column prop="b" label="保单号"  align="center" width=""> </el-table-column> -->
                                    <el-table-column prop="taskType"  label="任务类型" :formatter="taskTypeFormat" align="center" width="100"></el-table-column>
                                    <el-table-column prop="insuredName"  label="被保险人"  align="center" width="100"></el-table-column>
                                    <el-table-column prop="handleComrName" label="处理人机构" align="center" width=""> </el-table-column>
                                    <el-table-column prop="handlerName"  label="处理人" align="center" width="80"> </el-table-column>
                                    <el-table-column prop="flowInTime"  label="流入时间" align="center" width=""></el-table-column>
                                  </el-table>
                                </div>
                              </template>
                              <div style="margin-top: 10px">
                                <template>
                                  <div class="pagination">
                                      <div v-show="pagination.totalPage>0" class="index_page">
                                            <el-pagination :current-page="pagination.currentPage" :page-size="pagination.rowsNumber"
                                                          :total="pagination.totalPage" background layout="prev, pager, next,total,jumper"
                                                          @size-change="handleSizeChange" @current-change="queryFun">
                                            </el-pagination>
                                      </div>
                                  </div>
                                </template>
                              </div>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="5">
                        <div style="background: rgba(255,255,255,-0.5);margin-left:16px;" class="grid-content bg-purple ">
                            <div >
                                <div style="width: 100%;height: 330px;border-radius: 10px" class="blue" >
                                    <div  class="blue">
                                      <div style="height: 40px;line-height: 40px;font-size: 20px;margin-left: 10%"><b>快捷功能</b></div>
                                    </div>
                                    <div >
                                        <div class="claim-icon-myTask"></div>
                                        <div class="left_three" v-for="(item,index1) in comMenu" :key="index1">
                                            <div>
                                                <router-link :to="item.path">
                                                    <svg-icon  :icon-class="item.icon"></svg-icon>
                                                </router-link>
                                            </div>
                                            <div>{{item.title}}</div>
                                        </div>
                                        <div class="left_three" style="border: dashed 1px">
                                            <div style="line-height: 65px;height: 60%">
                                                 <img src="~@/assets/images/shortcut/j.png" @click="transfer" width="25" alt="">
                                            </div>
                                            <div>自定义</div>
                                        </div>
                                    </div>
                                </div>
                                <div style="width: 100%;height: 210px;background: #ffffff;margin-top: 15px;border-radius: 10px">
                                    <div style="margin-left: 24px">
                                        <div style="height: 60px;line-height: 60px;font-size: 20px;"><b>案件查询</b></div>
                                    </div>
                                    <!--             <div style="height: 25px;"></div>-->
                                    <div style="border-bottom:1px solid #f1f1f1;width:87%;margin:0 auto"></div>
                                    <div style="text-align: center;width: 100%;margin-top: 30px;padding:0 16px">
                                        <form action="">
                                            <!-- <div style="width: 85%;height: 50px;line-height: 50px;margin: auto"><input type="text" class="el-icon-search" placeholder="请输入赔案号" name="tel"></div> -->
                                            <el-input v-model="queryCaseParem" placeholder="请输入赔案号" prefix-icon="el-icon-search"></el-input>
                                            <div class="search-btn" style="margin-top:18px" @click="homeCaseList">查询</div>
                                        </form>
                                    </div>
                                    <!-- <div style="margin-left: 20%">
                                      <img src="~@/assets/images/yan.png" width="150" height="59" alt="">
                                    </div> -->
                                </div>
                            </div>
                        </div>
                    </el-col>
                </div>
            </el-row>
            <transfer-component
            ref="transferComponent"
            :routeMenu="routes"
            :menuList="comMenu"
            @getMenu="selectIcom"
            ></transfer-component>
            <el-dialog title="案件流程"
                        :visible.sync="dialogVisible"
                        width="70%"
                        center
                        class="edit-form">
                <el-form :model="editForm" label-width="80px" ref="editForm">
                    <template>
                        <el-table
                            :data="homesCaseList"
                            style="width: 100%"
                            stripe="true"
                            fit="true">
                            <el-table-column
                              type="index"
                              width="50">
                            </el-table-column>
                            <el-table-column
                                prop="taskType"
                                label="环节"
                                width="140" 
                                style="color: #1e99f9"
                                :formatter="formatAllTaskType">
                                <!-- <template slot-scope="scope">
                                    <a @click="toTaskDetailPage(scope.row)" style="color: #1e99f9;cursor: pointer">{{scope.row.taskType}}</a>
                                </template> -->
                            </el-table-column>
                            <el-table-column
                                prop="handleComrName"
                                label="处理人机构"
                                width="120">
                            </el-table-column>
                            <el-table-column
                                prop="handlerName"
                                label="处理人"
                                width="100">
                            </el-table-column>
                            <el-table-column
                                prop="taskState"
                                label="状态">
                                <template slot-scope="scope">
                                    <span v-if="scope.row.taskState == '01'">待处理</span>
                                    <span v-if="scope.row.taskState == '02'">已暂存(正处理)</span>
                                    <span v-if="scope.row.taskState == '03'">已处理</span>
                                    <span v-if="scope.row.taskState == '04'">已退回</span>
                                    <span v-if="scope.row.taskState == '05'">已关闭</span>
                                    <span v-if="scope.row.taskState == '06'">提交上级</span>
                                </template>
                            </el-table-column>
                            <el-table-column
                                prop="flowInTime"
                                label="开始时间">
                            </el-table-column>
                            <el-table-column
                                prop="flowOutTime"
                                label="完成时间">
                            </el-table-column>
                        </el-table>
                    </template>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button type="primary" class="el-button el-button--primary"  @click.native="handleCancel('editForm')">关闭</el-button>
                </div>
            </el-dialog>
        </div>
    </template>

    <script>
    import util from '@/libs/util';
    import { queryHomeCaseInfo, queryHomeInfo, taskCheck, getRoute,selectUserShourts} from '@/api/baseDate';
    import {TransferComponent} from "./components";
    import Cookies from 'js-cookie';
    export default {
        name: 'dashboard',
        components: {TransferComponent},
        data() {
            return {
                routes:[],
                comMenu:[],
                dialogVisible: false,
                homesCaseList:{},
                editForm:null,
                week:'',// 本周周几
                date_show:'', //本日日期
                time_show:'',//当前时间，时分秒
                pagination: {
                    currentPage: 1, // 当前页
                    rowsNumber: 5, // 每页条数
                    totalPage: 0 // 总条数
                  },
                tableData: [],
                pendingTask:{}, // 待处理任务
                underwayTask:{}, // 正处理任务
                finishTask:{}, // 已完成任务
                queryCaseParem:null,
                tel:null
            }
        },
        mounted(){
            // 获取日期-星期
            this.getdataTime()
            // 读秒
            setInterval(() => {
                this.getnewTime()
            },1000)
        },
        created(){
            this.queryHome();
            this.getRoutes();
            this.selectUserShourt();
        },
        methods: {
        selectUserShourt(){
            var data={
            userCode: Cookies.get("userCode"),
            }
            selectUserShourts(data).then(res => {
                if(res.data.resultCode == '0000'){
                    if(res.data.userShortcutList!=null){
                      this.comMenu=res.data.userShortcutList
                    }else{
                      this.comMenu=[]
                    }
                }else{
                this.$alert(res.data.resultMsg,'提示', {
                    confirmButtonText: '确定'
                });
                }
            })
        },
        getRoutes(){
            getRoute({
                "head": "",
                "body": {
                    "comCode":Cookies.get("makeCom"),
                    "userCode":Cookies.get("userCode")
                }
                }).then(res => {
                    let list=[]
                    res.data.forEach((items,index)=>{
                        if(items.path!="/dashboard"){
                            items.children.forEach((ele,eleIndex)=>{
                                var item={}
                                item.icon=ele.meta.icon;
                                item.title=ele.meta.title;
                                item.path=items.path+"/"+ele.path;
                                list.push(item)
                            })
                        }
                    })
                    this.routes=list;
                    console.log(this.routes)
                })
        },
        selectIcom(e){
          this.comMenu=e;
          this.$refs["transferComponent"].transfer = false;
        },
        transfer(){
          this.$refs["transferComponent"].transfer = true;
        },
            handleClose(done) {
              this.$confirm('确认关闭？')
                  .then(_ => {
                    done();
                  })
                  .catch(_ => {});
            },
            handleCancel(formName) {
                this.dialogVisible = false;
            },
            // 获取当前系统日期
            getdataTime(){
                let wk = new Date().getDay()
                //let yy = new Date().getFullYear();
                let mm = new Date().getMonth() + 1;
                let dd = new Date().getDate();
                //let weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
                let weeks = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
                this.week = weeks[wk]
                //this.date_show = yy + "年" + mm + "月" + dd + "日"
                this.date_show = mm + "月" + dd + "日"
            },
            // 获取当前系统的时间
            getnewTime(){
                let hh = new Date().getHours();
                let mf =
                  new Date().getMinutes() < 10
                    ? "0" + new Date().getMinutes()
                    : new Date().getMinutes();
                let ss =
                  new Date().getSeconds() < 10
                    ? "0" + new Date().getSeconds()
                    : new Date().getSeconds();
                this.time_show = hh + ":" + mf + ":" + ss;
            },
            handleSizeChange(){ // 改变当前页条数事件
                this.pagination.rowsNumber = 5;
                this.queryHome();
            },
            queryFun(pageNum){ // 改变当前页事件
                this.pagination.currentPage = pageNum;
                this.queryHome();
            },
            queryHome(){
                let param = {
                    comCode: Cookies.get("makeCom"),
                    handlerCode:Cookies.get("userCode"),
                    pageNum: this.pagination.currentPage,
                    pageSize: this.pagination.rowsNumber
                }
                util.loading(this);
                queryHomeInfo(param).then((res)=> this.handleTaskListResponse(res));
            },
            // 跳转详情
            toDetailPage(param, pathName){
                this.$router.push({
                    name: pathName,
                    params: param,
                });
            },
            // 占位校验
            checkTask(processId, param, pathName){
                let checkDatas = {
                    processId: processId,
                    handleComrCode: Cookies.get("makeCom"),
                    handleComrName: Cookies.get("cMakeCom"),
                    handlerCode: Cookies.get("userCode"),
                    handlerName: Cookies.get("userName"),
                    reqFlag: "check"
                }
                taskCheck(checkDatas).then(res => {
                    if(res){
                        if(res.data.resultCode != '0000'){
                            this.$alert(res.data.resultMsg,'提示', {
                                confirmButtonText: '确定'
                            });
                        }else{
                            // 跳转页面
                            this.toDetailPage(param, pathName);
                        }
                    }else{
                        this.$message.error('系统异常');
                    }
                })
            },
            handleTaskListResponse(res){
                util.stopLoading(this);
                if(res){
                    if(res.data.resultCode){
                        if(res.data.resultCode != '0000'){
                            // 返回失败
                            this.$message.error(res.data.resultMsg);
                        }else{
                            // 返回成功
                            this.tableData = res.data.recentTasks.list;
                            this.pagination.totalPage = res.data.recentTasks.total;
                            this.pendingTask = res.data.pendingTask;
                            this.underwayTask = res.data.underwayTask;
                            this.finishTask = res.data.finishTask;
                        }
                    }
                }else{
                    this.$message.error('系统异常');
                }
            },
            taskTypeFormat(row){
                if (row.taskType === 'case_main') {
                    return '案件登记';
                } else if (row.taskType === 'cancel_audit') {
                    return '注销审核';
                } else if (row.taskType === 'survey') {
                    return '调查处理';
                }  else if (row.taskType === 'survey_audit') {
                    return '调查审核';
                }  else if (row.taskType === 'settle_audit') {
                    return '结算审核';
                }  else if (row.taskType === 'recase') {
                    return '重开处理';
                }  else if (row.taskType === 'recase_audit') {
                    return '重开审核';
                }  else if (row.taskType === 'refund_ticket') {
                    return '退票处理';
              }   else if (row.taskType === 'refund_ticket_audit') {
                    return '退票审核';
                }  else {
                    return '核赔';
                }
            },
            toTaskListPage(taskType){
                if (taskType === 'case_main') {
                    alert("------------自己写跳转页面---------------------------------");
                } else if (taskType === 'cancel_audit') {
                    alert("------------自己写跳转页面---------------------------------");
                } else if (taskType === 'survey') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (taskType === 'survey_audit') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (taskType === 'settle_audit') {
                    this.$router.push({name: 'settlementTaskAudit'});
                }  else if (taskType === 'recase') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (taskType === 'recase_audit') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (taskType === 'refund_ticket') {
                    this.$router.push({name: 'refundTicketAudit'});
                }  else if (taskType === 'refund_ticket_audit'){
                    alert("------------自己写跳转页面---------------------------------");
                }
            },
            toTaskDetailPage(row){
                if (row.taskType === 'case_main') {
                    const datas = {
                        caseNo:row.businessNo,
                        taskId: row.taskId,
                        serialNo: row.serialNo,
                        damageDate: row.damageDate,
                        policyNo: row.policyNo,
                        name:"deal"
                    }
                    this.toDetailPage(datas, 'caseProcessDetail');
                } else if (row.taskType === 'cancel_audit') {
                    const datas = {
                        taskId: row.businessId,
                        taskState: row.taskState,
                        policyNo: row.policyNo,
                        insuredName: row.insuredName,
                        socialSecurityNo: row.socialSecurityNo,
                        documentTypeName: row.documentTypeName,
                        documentNo: row.documentNo,
                        comCode: row.comCode
                    }
                    this.checkTask(row.processId, datas, 'caseCancelAuditDetail')
                } else if (row.taskType === 'survey') {
                    const datas = {
                        taskId: row.taskId,
                        taskState: row.taskState,
                        policyNo: row.policyNo,
                        insuredName: row.insuredName,
                        socialSecurityNo: row.socialSecurityNo,
                        documentTypeName: row.documentTypeName,
                        documentNo: row.documentNo,
                        comCode: row.comCode
                    };
                    this.checkTask(row.processId, datas, 'surveyTaskListDetail')
                }  else if (row.taskType === 'survey_audit') {
                    const datas = {
                        taskId: row.businessId,
                        taskState: row.taskState,
                        policyNo: row.policyNo,
                        insuredName: row.insuredName,
                        socialSecurityNo: row.socialSecurityNo,
                        documentTypeName: row.documentTypeName,
                        documentNo: row.documentNo,
                        comCode: row.comCode
                    };
                    this.checkTask(row.processId, datas, 'surveyTaskAuditDetail')
                }  else if (row.taskType === 'settle_audit') {
                    const datas = {
                        taskId: row.businessId,
                        settleNo: row.businessNo,
                        taskState: row.taskState,
                    };
                    this.checkTask(row.processId, datas, 'settlementTaskAuditDetail')
                }  else if (row.taskType === 'recase') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (row.taskType === 'recase_audit') {
                    alert("------------自己写跳转页面---------------------------------");
                }  else if (row.taskType === 'refund_ticket') {
                    const datas = {
                        taskId: row.taskId,
                        taskState: row.taskState,
                    };
                    this.checkTask(row.processId, datas, 'refundTicketDetail')
                }  else if (row.taskType === 'refund_ticket_audit'){
                    const datas = {
                        taskId: row.businessId,
                        taskState: row.taskState,
                    };
                    this.checkTask(row.processId, datas, 'refundTicketAuditDetail')
                }  else if (row.taskType === 'undwrt_f_one'){
                    const datas = {
                        caseNo: row.businessNo,
                        taskId: row.taskId,
                        taskType: row.taskType,
                        policyNo: row.policyNo,
                        damageDate: row.damageDate,
                        taskState:row.taskState,
                        name:"cache",
                        serialNo:row.serialNo,
                        processId:row.processId
                    };
                    this.checkTask(row.processId, datas, 'caseClaimTaskAudit')
                }
            },
            homeCaseList: function () {
              if (this.queryCaseParem == null || this.queryCaseParem == undefined || this.queryCaseParem == ""){
                this.$message({
                    message: '赔案号不能为空！',
                    type: 'warning'
                });
                return;
              };
              if (isNaN(this.queryCaseParem)){
                this.$message({
                  message: '赔案号不合法！',
                  type: 'warning'
                });
                return;
              };

              let param = {
                caseNo:this.queryCaseParem
              }
              //请求流程信息
              queryHomeCaseInfo(param).then((res)=> this.homeCaseInfoList(res));

            },
            //数据处理
            homeCaseInfoList: function(res) {
              if (res.data.length>0){
                    this.dialogVisible = true;
                    this.homesCaseList = res.data;
                    console.log(this.homesCaseList);
              }else {
                this.$message({
                    message: '当前赔案号暂无流程！',
                    type: 'warning'
                });
              }
            }
        },
    }
    </script>
    <style lang="less" scoped>
      .svg-icon{
        width: 3.8em;
        height: 3.8em;
        color:#60bfeb;
      }
      </style>


